<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@ page language="java" import="java.sql.*, java.io.*, java.util.*, database.*" %>
<jsp:useBean id="con" class="database.DatabaseConnection"/>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Delete Information</title>
<style type="text/css">
<!--
body {
	background-image: url(../../image/3110_background/backcolor3.jpg);
	background-repeat: repeat;
}
.STYLE1 {
	color: #2a778b;
	font-weight: bold;
	font-size: 18px;
}
-->
</style></head>

<body>
<form id="form1" name="form1" method="post" action="">
  <table width="975" height="256" border="1" align="center">
    <tr>
      <td colspan="7" align="center" valign="middle" nowrap="nowrap"><span class="STYLE1">Delete Information</span></td>
    </tr>
    <tr align="center">
      <td width="113" nowrap="nowrap">ID </td>
      <td width="175" nowrap="nowrap">Address</td>
      <td width="290" nowrap="nowrap">News Full Name</td>
      <td width="187" nowrap="nowrap">Abbreviation</td>
      <td width="92" nowrap="nowrap">Data</td>
      <td colspan="2" nowrap="nowrap">Action</td>
    </tr>

                <%
        con.createConnection();
        ResultSet rs = con.getNews();
        String ID = null;
        String Address = null;
        String NewsFullName = null;
        String Abbreviation = null;
        String Date_Time = null;

                    for (int j = 0; j < 15; j++) {
                        if (rs.next()) {
                            ID = rs.getString("ID");
                            Address = rs.getString("Address");
                            NewsFullName = rs.getString("NewsFullName");
                            Abbreviation = rs.getString("Abbreviation");
                            Date_Time = rs.getString("Date_Time");
                    %>
                    <tr align="left" valign="top">
                    <td align="center" valign="middle"><%=ID%></td>
                    <td align="center" valign="middle"><%=Address%></td>
                    <td align="center" valign="middle"><%=NewsFullName%></td>
                    <td align="center" valign="middle"><%=Abbreviation%></td>
                    <td align="center" valign="middle"><%=Date_Time%></td>
                    <td colspan="2" align="center" valign="middle"><input type="button" value="Delete" target="mainFrame" onClick="window.location.href='DeleteDoTheMath.jsp?TF=0&ID=<%=ID%>'"></td>
                    </tr>
                    <%
                        }
                    }
                    %>
    <tr>
      <td colspan="5" align="center">&nbsp;</td>
      <td width="46" align="center">Back</td>
      <td width="42" align="center">Next</td>
    </tr>
  </table>
</form>
</body>
</html>
